//
// Created by wxd on 2025/9/2.
//

#include "MaterialManager.h"

/*std::string MaterialManager::addMaterial(Material &material) {
    const std::string traceId = material.getTraceId();
    m_MaterialMap.try_emplace(traceId, material.clone());
    return traceId;
}

Material *MaterialManager::getMaterial(const std::string &materialId) {
    auto it = m_MaterialMap.find(materialId);
    return it != m_MaterialMap.end() ? it->second.get() : nullptr;
}

bool MaterialManager::removeMaterial(const std::string &materialId) {
    if (const auto it = m_MaterialMap.find(materialId); it != m_MaterialMap.end()) {
        m_MaterialMap.erase(it);
        return true;
    }
    return false;
}

bool MaterialManager::contain(const std::string &materialId) {
    return m_MaterialMap.find(materialId) != m_MaterialMap.end();
}

void MaterialManager::clear() {
    m_MaterialMap.clear();
}*/